{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Multimedia Security Experiment 9\n"
     ]
    }
   ],
   "source": [
    "print(\"Multimedia Security Experiment 9\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "import myipf # 前面的实验编写的函数\n",
    "from matplotlib.gridspec import GridSpec\n",
    "#from mpl_toolkits.mplot3d.axes3d import Axes3D\n",
    "\n",
    "%matplotlib inline\n",
    "plt.rcParams[\"font.sans-serif\"] = [\"SimHei\"] # 用来正常显示中文\n",
    "plt.rcParams[\"axes.unicode_minus\"]=False # 用来正常显示负号\n",
    "%config InlineBackend.figure_format = \"svg\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "import cv2 as cv"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "img = cv.imread(\"test.png\")\n",
    "img = myipf.grayImageJudge(img)\n",
    "img = np.uint8(img)\n",
    "\n",
    "# 转化为背景为黑色的二值图像\n",
    "for i in range(img.shape[0]):\n",
    "    for j in range(img.shape[1]):\n",
    "        if img[i][j] > 100:\n",
    "            img[i][j] = 0\n",
    "        else:\n",
    "            img[i][j] = 255"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       "  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<!-- Created with matplotlib (https://matplotlib.org/) -->\n",
       "<svg height=\"245.708934pt\" version=\"1.1\" viewBox=\"0 0 349.2 245.708934\" width=\"349.2pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
       " <defs>\n",
       "  <style type=\"text/css\">\n",
       "*{stroke-linecap:butt;stroke-linejoin:round;}\n",
       "  </style>\n",
       " </defs>\n",
       " <g id=\"figure_1\">\n",
       "  <g id=\"patch_1\">\n",
       "   <path d=\"M 0 245.708934 \n",
       "L 349.2 245.708934 \n",
       "L 349.2 0 \n",
       "L 0 0 \n",
       "z\n",
       "\" style=\"fill:none;\"/>\n",
       "  </g>\n",
       "  <g id=\"axes_1\">\n",
       "   <g clip-path=\"url(#pa9d481e5f9)\">\n",
       "    <image height=\"63\" id=\"image804e96dcfe\" transform=\"scale(1 -1)translate(0 -63)\" width=\"335\" x=\"7.2\" xlink:href=\"data:image/png;base64,\n",
       "iVBORw0KGgoAAAANSUhEUgAAAU8AAAA/CAYAAABgmEqHAAAABHNCSVQICAgIfAhkiAAAAlNJREFUeJzt3dtuozAUBVA8mv//ZeahYhS1JYGNjQ2s9VKpogXDYdvmkpRpmuYJgF3+9N4AgCsSngAB4QkQEJ4AAeEJEBCeAAHhCRAQngAB4QkQEJ4AAeEJEBCeAAHhCRAQngAB4QkQEJ4AAeEJEBCeAAHhCRAQngAB4QkQ+Jv80Tx/feFmKWXzsluXT72u51XLdX7ajrPWvdb2NS22a8821Fz/3v3d8vj0Pg4jngOftKqFrf/7SD3cYuT57mDN87y7qO/O/niW5Ry4+7lwdidx+fC8czG0cnaRweiScyKato9iyzB9WWae50eERq82fl/vnks7d9S73T3PhbVaWNuuXo4OvC4/8lysHZSRDhb09Hou3HXGdmYbbxOewGcGEz+l++TS03Yg94RLWS1Hn1VHnne/m8e1qMVnOqtDqDbyVKiM5Gk3Cln37ubZEa55Ao91pGNtEp5GofSk/ngXirXqo8q0XbEyolLK/+vwI76i6HLCtVUdeSoGYDSt3vmv/qhSz94eRpkFqf3+lixq5fDI8+mv4TGmpR6Xn6OEKn3VrIMmN4wEKT2pv3WjvmfeWovOs+mjSnp7zqTe2KpGx3EoPE3ZuQJT9y9PHHW2/KAQ77aHthyIUT7Z+wxrbf3t93ds/3e9H1Xq2VF8+nDyV1euhWbT9ivvFK5L3b1XSnn8PqrV/jJN07PnMgAB77YDBIQnQEB4AgSEJ0BAeAIEhCdAQHgCBIQnQEB4AgSEJ0BAeAIEhCdAQHgCBIQnQEB4AgSEJ0BAeAIEhCdAQHgCBIQnQOAfGhfaevGg/7sAAAAASUVORK5CYII=\" y=\"-22.021875\"/>\n",
       "   </g>\n",
       "   <g id=\"text_1\">\n",
       "    <!-- 原图 -->\n",
       "    <defs>\n",
       "     <path d=\"M 60.15625 66.796875 \n",
       "Q 57.421875 62.890625 56.25 57.8125 \n",
       "L 85.15625 57.8125 \n",
       "Q 84.765625 54.296875 84.765625 46.875 \n",
       "L 84.765625 34.765625 \n",
       "Q 84.765625 28.515625 85.15625 23.046875 \n",
       "L 63.28125 23.046875 \n",
       "L 63.28125 -0.78125 \n",
       "Q 63.28125 -6.25 59.765625 -7.609375 \n",
       "Q 56.25 -8.984375 48.4375 -9.765625 \n",
       "Q 47.65625 -5.078125 45.703125 -0.78125 \n",
       "Q 53.125 -1.171875 54.296875 -0.578125 \n",
       "Q 55.46875 0 55.46875 2.734375 \n",
       "L 55.46875 23.046875 \n",
       "L 33.203125 23.046875 \n",
       "Q 33.59375 27.734375 33.59375 34.375 \n",
       "L 33.59375 47.265625 \n",
       "Q 33.59375 53.515625 33.203125 57.8125 \n",
       "L 49.21875 57.8125 \n",
       "Q 51.5625 66.40625 51.5625 69.140625 \n",
       "L 60.15625 66.796875 \n",
       "z\n",
       "M 4.296875 -5.078125 \n",
       "Q 11.328125 4.296875 13.671875 16.203125 \n",
       "Q 16.015625 28.125 16.015625 35.9375 \n",
       "L 16.015625 64.453125 \n",
       "Q 16.015625 72.65625 15.625 76.5625 \n",
       "L 78.515625 76.5625 \n",
       "Q 87.109375 76.5625 90.625 76.953125 \n",
       "L 90.625 69.921875 \n",
       "Q 87.5 70.3125 78.515625 70.3125 \n",
       "L 23.828125 70.3125 \n",
       "L 23.828125 37.109375 \n",
       "Q 23.4375 25.78125 22.0625 17.375 \n",
       "Q 20.703125 8.984375 17.765625 1.953125 \n",
       "Q 14.84375 -5.078125 12.5 -8.984375 \n",
       "Q 8.59375 -6.25 4.296875 -5.078125 \n",
       "z\n",
       "M 76.953125 43.359375 \n",
       "L 76.953125 51.953125 \n",
       "L 41.015625 51.953125 \n",
       "L 41.015625 43.359375 \n",
       "z\n",
       "M 76.953125 29.296875 \n",
       "L 76.953125 37.5 \n",
       "L 41.015625 37.5 \n",
       "L 41.015625 29.296875 \n",
       "z\n",
       "M 23.046875 -0.78125 \n",
       "Q 28.125 2.34375 32.609375 7.03125 \n",
       "Q 37.109375 11.71875 40.234375 17.1875 \n",
       "Q 43.75 13.671875 46.484375 11.71875 \n",
       "Q 35.9375 -0.78125 28.515625 -6.25 \n",
       "Q 26.171875 -3.515625 23.046875 -0.78125 \n",
       "z\n",
       "M 75.390625 16.796875 \n",
       "Q 89.0625 4.6875 92.578125 0.390625 \n",
       "Q 89.84375 -1.953125 87.109375 -5.078125 \n",
       "Q 82.03125 1.171875 70.3125 11.328125 \n",
       "Q 73.046875 14.453125 75.390625 16.796875 \n",
       "z\n",
       "\" id=\"SimHei-21407\"/>\n",
       "     <path d=\"M 90.625 77.734375 \n",
       "Q 90.234375 67.96875 90.234375 56.25 \n",
       "L 90.234375 14.453125 \n",
       "Q 90.234375 2.34375 90.625 -9.375 \n",
       "L 82.8125 -9.375 \n",
       "L 82.8125 -4.296875 \n",
       "L 17.578125 -4.296875 \n",
       "L 17.578125 -10.15625 \n",
       "L 9.765625 -10.15625 \n",
       "Q 10.15625 1.953125 10.15625 14.84375 \n",
       "L 10.15625 56.25 \n",
       "Q 10.15625 67.578125 9.765625 77.734375 \n",
       "L 90.625 77.734375 \n",
       "z\n",
       "M 82.8125 2.34375 \n",
       "L 82.8125 71.484375 \n",
       "L 17.578125 71.484375 \n",
       "L 17.578125 2.34375 \n",
       "z\n",
       "M 50.390625 66.40625 \n",
       "Q 48.046875 64.0625 46.09375 61.328125 \n",
       "L 72.265625 61.328125 \n",
       "Q 70.703125 57.8125 67.1875 52.734375 \n",
       "Q 63.671875 47.65625 56.25 40.625 \n",
       "Q 67.96875 34.765625 79.296875 33.59375 \n",
       "Q 76.5625 30.078125 74.609375 26.171875 \n",
       "Q 60.15625 30.46875 50.390625 36.71875 \n",
       "Q 39.0625 29.296875 26.171875 25.78125 \n",
       "Q 25 29.296875 21.875 32.421875 \n",
       "Q 34.375 34.375 44.921875 40.625 \n",
       "Q 39.453125 45.703125 37.109375 49.21875 \n",
       "Q 33.59375 45.3125 29.6875 41.40625 \n",
       "Q 26.953125 44.53125 23.828125 46.09375 \n",
       "Q 30.46875 51.5625 35.15625 58.390625 \n",
       "Q 39.84375 65.234375 41.796875 69.921875 \n",
       "Q 45.703125 67.96875 50.390625 66.40625 \n",
       "z\n",
       "M 38.28125 19.921875 \n",
       "Q 55.46875 14.84375 64.0625 11.328125 \n",
       "Q 62.109375 8.203125 60.15625 4.6875 \n",
       "Q 44.140625 11.328125 35.546875 13.28125 \n",
       "Q 37.109375 16.40625 38.28125 19.921875 \n",
       "z\n",
       "M 45.703125 32.03125 \n",
       "Q 58.984375 26.5625 63.671875 25 \n",
       "Q 61.71875 21.875 60.15625 17.96875 \n",
       "Q 46.875 24.21875 42.1875 25.78125 \n",
       "Q 44.140625 28.515625 45.703125 32.03125 \n",
       "z\n",
       "M 41.015625 53.90625 \n",
       "Q 46.875 47.265625 51.171875 44.53125 \n",
       "Q 56.25 48.4375 60.546875 55.078125 \n",
       "L 41.796875 55.078125 \n",
       "L 41.015625 53.90625 \n",
       "z\n",
       "\" id=\"SimHei-22270\"/>\n",
       "    </defs>\n",
       "    <g transform=\"translate(162.6 16.246875)scale(0.12 -0.12)\">\n",
       "     <use xlink:href=\"#SimHei-21407\"/>\n",
       "     <use x=\"100\" xlink:href=\"#SimHei-22270\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       "  <g id=\"axes_2\">\n",
       "   <g clip-path=\"url(#p411df4c36f)\">\n",
       "    <image height=\"63\" id=\"imagec5993ec6af\" transform=\"scale(1 -1)translate(0 -63)\" width=\"335\" x=\"7.2\" xlink:href=\"data:image/png;base64,\n",
       "iVBORw0KGgoAAAANSUhEUgAAAU8AAAA/CAYAAABgmEqHAAAABHNCSVQICAgIfAhkiAAAAmdJREFUeJzt3dtymzAUBVDU6f//svvQ8Qx1cYANutha6zFxBgkftsRFpCzL8lgAOOVX7wYAfCLhCRAQngAB4QkQEJ4AAeEJEBCeAAHhCRAQngAB4QkQEJ4AAeEJEBCeAAHhCRAQngAB4QkQEJ4AAeEJEBCeAAHhCRAQngAB4QkQ+J380ePx978Vl1IOf/7oZ1PPNm2pve1XLfq7tc2jarXtSBtqbPvM/j5bu0lbjqq1L1puL2nHU83+t6iHKDxH824HPH/eI8x66dnP9bZrh9Toevd761ho+Z1s1UKLbZdSTg1gV3z8aftPBVFK6V7ELc3U15H1/h72joVW4fLantFmvk9puz4+PJflWOdbFwyMqHewt9Cqj18RnsA5JhPX98FXXPPc0/I6CIxuluOh9k2rKcITmNdWQN4xeNx62r6+o9fCDKMnOfUxr72bVHdcF3XNE5jOUDNPozwjeT7b26MuHQvjqLlo4NZrnjM8BgFH7AWoY6W+2oPnbeH5uqJAcdDLuv561aH6/363nLY7TWFkvVbUMKa7Jne3hOdrQxQPPanHn8022anV32p322f7ghiDumOt5sB5OTwVK59Anf7LbPy6aiuMZlkC9o6bZm3N/gq8o2Y9Jmu8Fu/SzFNA/G/W4hxdy8G8dw1sbb/1+zy32tNrv9Tqr7XtF+wVw9bvv3mweXfQrn1z/9d6P+fZe7+/63/LFyPXVpZlMVUCOMnadoCA8AQICE+AgPAECAhPgIDwBAgIT4CA8AQICE+AgPAECAhPgIDwBAgIT4CA8AQICE+AgPAECAhPgIDwBAgIT4CA8AQI/AHCpuaLE8cn4wAAAABJRU5ErkJggg==\" y=\"-98.765404\"/>\n",
       "   </g>\n",
       "   <g id=\"text_2\">\n",
       "    <!-- 腐蚀 -->\n",
       "    <defs>\n",
       "     <path d=\"M 60.9375 34.765625 \n",
       "Q 59.375 32.421875 58.984375 30.078125 \n",
       "L 86.328125 30.078125 \n",
       "Q 85.9375 25 85.9375 20.703125 \n",
       "L 85.9375 1.5625 \n",
       "Q 85.9375 -4.6875 83.390625 -6.4375 \n",
       "Q 80.859375 -8.203125 75.390625 -8.984375 \n",
       "Q 74.21875 -4.6875 71.875 -1.5625 \n",
       "Q 76.171875 -1.5625 77.734375 -0.96875 \n",
       "Q 79.296875 -0.390625 79.296875 2.734375 \n",
       "L 79.296875 24.21875 \n",
       "L 58.203125 24.21875 \n",
       "Q 61.328125 22.65625 65.421875 20.3125 \n",
       "Q 69.53125 17.96875 74.21875 15.234375 \n",
       "Q 71.875 12.5 69.53125 8.59375 \n",
       "Q 66.015625 12.109375 62.296875 14.640625 \n",
       "Q 58.59375 17.1875 55.078125 19.140625 \n",
       "Q 50.78125 14.0625 42.1875 7.8125 \n",
       "Q 40.234375 11.71875 37.5 14.453125 \n",
       "Q 43.359375 16.796875 46.09375 18.9375 \n",
       "Q 48.828125 21.09375 51.171875 24.21875 \n",
       "L 35.546875 24.21875 \n",
       "L 35.546875 -7.8125 \n",
       "L 28.125 -7.8125 \n",
       "Q 28.515625 0 28.515625 12.109375 \n",
       "Q 28.515625 24.609375 28.125 30.078125 \n",
       "L 52.734375 30.078125 \n",
       "Q 53.515625 32.421875 53.515625 35.9375 \n",
       "Q 58.203125 35.15625 60.9375 34.765625 \n",
       "z\n",
       "M 21.484375 67.1875 \n",
       "Q 21.484375 33.59375 20.5 24.796875 \n",
       "Q 19.53125 16.015625 17.578125 8.59375 \n",
       "Q 15.625 1.171875 11.328125 -7.03125 \n",
       "Q 8.59375 -3.515625 5.078125 -1.171875 \n",
       "Q 8.984375 4.6875 10.9375 12.109375 \n",
       "Q 12.890625 19.53125 13.671875 28.703125 \n",
       "Q 14.453125 37.890625 14.453125 52.34375 \n",
       "Q 14.453125 67.1875 14.0625 73.4375 \n",
       "L 48.828125 73.4375 \n",
       "Q 48.4375 75 47.265625 79.296875 \n",
       "Q 50.78125 79.6875 55.859375 80.859375 \n",
       "Q 56.640625 76.953125 57.421875 73.4375 \n",
       "L 92.96875 73.4375 \n",
       "L 92.96875 66.796875 \n",
       "Q 85.546875 67.1875 79.6875 67.1875 \n",
       "L 21.484375 67.1875 \n",
       "z\n",
       "M 80.078125 64.453125 \n",
       "Q 79.6875 60.9375 79.6875 57.421875 \n",
       "Q 85.15625 57.421875 90.625 57.8125 \n",
       "L 90.625 51.5625 \n",
       "Q 85.15625 51.953125 79.6875 51.953125 \n",
       "L 79.6875 41.015625 \n",
       "Q 79.6875 35.9375 76.953125 34.5625 \n",
       "Q 74.21875 33.203125 68.359375 32.03125 \n",
       "Q 67.1875 35.9375 64.84375 39.0625 \n",
       "Q 70.3125 39.0625 71.484375 39.453125 \n",
       "Q 72.65625 39.84375 72.65625 43.75 \n",
       "L 72.65625 51.953125 \n",
       "L 56.25 51.953125 \n",
       "Q 50 51.953125 44.921875 51.5625 \n",
       "L 44.921875 57.8125 \n",
       "Q 50 57.421875 56.25 57.421875 \n",
       "L 72.65625 57.421875 \n",
       "Q 72.65625 60.9375 72.265625 64.453125 \n",
       "L 80.078125 64.453125 \n",
       "z\n",
       "M 21.875 47.65625 \n",
       "Q 27.34375 51.171875 31.046875 55.859375 \n",
       "Q 34.765625 60.546875 37.5 66.40625 \n",
       "Q 40.625 64.453125 44.53125 62.5 \n",
       "Q 41.796875 58.984375 40.234375 56.640625 \n",
       "L 40.234375 44.140625 \n",
       "Q 40.234375 39.84375 40.625 33.203125 \n",
       "L 32.8125 33.203125 \n",
       "Q 33.203125 39.453125 33.203125 44.140625 \n",
       "L 33.203125 48.4375 \n",
       "Q 30.46875 45.3125 26.953125 41.40625 \n",
       "Q 25 44.921875 21.875 47.65625 \n",
       "z\n",
       "M 60.546875 12.890625 \n",
       "Q 58.59375 10.15625 58.203125 8.984375 \n",
       "Q 64.0625 5.859375 72.265625 0.78125 \n",
       "Q 69.921875 -1.953125 67.578125 -5.078125 \n",
       "Q 61.328125 0.390625 55.078125 4.6875 \n",
       "Q 52.34375 0 42.96875 -7.8125 \n",
       "Q 41.015625 -4.296875 38.28125 -2.34375 \n",
       "Q 43.359375 0.78125 47.265625 4.6875 \n",
       "Q 51.171875 8.59375 53.90625 15.625 \n",
       "Q 56.640625 13.671875 60.546875 12.890625 \n",
       "z\n",
       "M 50.390625 47.265625 \n",
       "Q 53.90625 48.4375 56.640625 50.390625 \n",
       "Q 58.59375 45.703125 60.9375 40.625 \n",
       "Q 58.203125 39.84375 55.078125 38.28125 \n",
       "Q 53.125 43.359375 50.390625 47.265625 \n",
       "z\n",
       "\" id=\"SimHei-33104\"/>\n",
       "     <path d=\"M 61.71875 60.15625 \n",
       "Q 61.71875 73.828125 61.328125 79.6875 \n",
       "L 69.921875 79.6875 \n",
       "Q 69.53125 73.828125 69.53125 60.15625 \n",
       "L 90.234375 60.15625 \n",
       "Q 89.84375 54.6875 89.84375 40.234375 \n",
       "Q 89.84375 25.78125 90.234375 18.75 \n",
       "L 82.8125 18.75 \n",
       "L 82.8125 23.4375 \n",
       "L 69.53125 23.4375 \n",
       "L 69.53125 2.734375 \n",
       "Q 76.953125 3.515625 82.8125 4.296875 \n",
       "Q 80.859375 9.765625 78.90625 12.890625 \n",
       "Q 83.203125 14.453125 85.9375 16.015625 \n",
       "Q 88.671875 10.9375 91.203125 4.484375 \n",
       "Q 93.75 -1.953125 95.703125 -7.421875 \n",
       "Q 92.1875 -8.203125 87.890625 -9.765625 \n",
       "Q 86.71875 -5.46875 84.765625 -1.953125 \n",
       "L 55.859375 -5.859375 \n",
       "Q 41.40625 -7.8125 38.28125 -8.59375 \n",
       "Q 37.5 -4.6875 34.765625 -0.390625 \n",
       "Q 42.578125 0 48.625 0.578125 \n",
       "Q 54.6875 1.171875 61.71875 1.953125 \n",
       "L 61.71875 23.4375 \n",
       "L 50 23.4375 \n",
       "L 50 17.578125 \n",
       "L 42.1875 16.015625 \n",
       "Q 42.578125 23.046875 42.578125 38.671875 \n",
       "Q 42.578125 54.296875 42.1875 60.15625 \n",
       "L 61.71875 60.15625 \n",
       "z\n",
       "M 25 42.578125 \n",
       "Q 24.609375 35.15625 24.609375 27.734375 \n",
       "L 24.609375 7.421875 \n",
       "Q 30.46875 13.28125 33.203125 17.96875 \n",
       "Q 35.15625 13.28125 37.890625 10.9375 \n",
       "Q 34.765625 8.203125 28.515625 0.96875 \n",
       "Q 22.265625 -6.25 20.3125 -8.984375 \n",
       "Q 16.796875 -5.859375 14.0625 -3.125 \n",
       "Q 16.796875 -0.390625 16.796875 5.46875 \n",
       "L 16.796875 42.578125 \n",
       "L 25 42.578125 \n",
       "z\n",
       "M 26.5625 75.390625 \n",
       "Q 25 73.046875 23.625 69.921875 \n",
       "Q 22.265625 66.796875 21.09375 64.0625 \n",
       "L 40.625 64.0625 \n",
       "Q 37.5 51.171875 35.546875 45.3125 \n",
       "Q 31.640625 46.875 28.125 47.265625 \n",
       "Q 30.078125 52.734375 31.25 57.8125 \n",
       "L 18.75 57.8125 \n",
       "Q 14.453125 48.4375 10.15625 40.625 \n",
       "Q 7.03125 43.75 3.515625 44.53125 \n",
       "Q 6.640625 48.4375 11.515625 59.171875 \n",
       "Q 16.40625 69.921875 18.359375 78.515625 \n",
       "L 26.5625 75.390625 \n",
       "z\n",
       "M 82.8125 29.6875 \n",
       "L 82.8125 54.296875 \n",
       "L 69.53125 54.296875 \n",
       "L 69.53125 29.6875 \n",
       "z\n",
       "M 61.71875 29.6875 \n",
       "L 61.71875 54.296875 \n",
       "L 50 54.296875 \n",
       "L 50 29.6875 \n",
       "z\n",
       "\" id=\"SimHei-34432\"/>\n",
       "    </defs>\n",
       "    <g transform=\"translate(162.6 92.990404)scale(0.12 -0.12)\">\n",
       "     <use xlink:href=\"#SimHei-33104\"/>\n",
       "     <use x=\"100\" xlink:href=\"#SimHei-34432\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       "  <g id=\"axes_3\">\n",
       "   <g clip-path=\"url(#p0f6890faf2)\">\n",
       "    <image height=\"63\" id=\"imagec0c158c6f9\" transform=\"scale(1 -1)translate(0 -63)\" width=\"335\" x=\"7.2\" xlink:href=\"data:image/png;base64,\n",
       "iVBORw0KGgoAAAANSUhEUgAAAU8AAAA/CAYAAABgmEqHAAAABHNCSVQICAgIfAhkiAAAAoNJREFUeJzt3cuSmzAQBVCUyv//MllN4lDGRk0LCXRO1ewY60FzscDYZVmWdQGgyq/eHQC4I+EJECA8AQKEJ0CA8AQIEJ4AAcITIEB4AgQIT4AA4QkQIDwBAoQnQIDwBAgQngABwhMgQHgCBAhPgADhCRAgPAEChCdAwO/eHci2rv9+z66U0rEnwJOVpfLXM1/DaVm+B1Tt9hHbNrauDNErxvupvaMy+1Xbh5Ztf3rtlvvmLvthxHrM6tPZbKrtS9Nle7SgsttY1/WSvsDoHAf7akP81tc8FQLUm+W4aT3OW4fnO6WUv39bsxTNN9lLN9eWY3rOW6tjoXZMmXNw9Xze9obRkesVpZQpA7PHQfna5tXXfUfVe9zb9rf7ZV3XJn28Qy1k9Ou24QnUmfHNRMvxPmbZPsoZDZhDWnj+3NGe7czGmNTjMU+bnyvfRKWE57trKdCLetw34wrt9Sbyu/FH5+Qxy3aAZfl+oyyLG0bQyEhPvpGv2TtPSyV6UHfUOHMCOx2eipU7UKdz2QvFzDqwbOexen+uccRl+awnkRYPBKQu20csFmDfTMds9tNOaeH505GZdgbjUo+05qNKMInZluytT5yuecKDfQpM78rPaRKevS/Ut1Yztr1tn1S43+bj6m/WGWVue3+ze4/grK2Fln35JKPNlGX7KMUK76jP/800Hy3HWh2e774z88h2n7aNOPpar9tltX/2dVrOw13P4llq6vGKdrP/54y9Z7uz22i5fYa0HFgqfwAOAHfbAUKEJ0CA8AQIEJ4AAcITIEB4AgQIT4AA4QkQIDwBAoQnQIDwBAgQngABwhMgQHgCBAhPgADhCRAgPAEChCdAgPAECPgD7ivJ2EXSHQgAAAAASUVORK5CYII=\" y=\"-175.508934\"/>\n",
       "   </g>\n",
       "   <g id=\"text_3\">\n",
       "    <!-- 膨胀 -->\n",
       "    <defs>\n",
       "     <path d=\"M 3.125 -3.90625 \n",
       "Q 6.640625 2.34375 8.78125 10.15625 \n",
       "Q 10.9375 17.96875 10.9375 27.34375 \n",
       "L 10.9375 61.328125 \n",
       "Q 10.9375 67.96875 10.546875 74.609375 \n",
       "L 34.375 74.609375 \n",
       "Q 33.984375 68.359375 33.984375 60.546875 \n",
       "L 33.984375 0.78125 \n",
       "Q 33.59375 -6.25 21.484375 -7.03125 \n",
       "Q 21.875 -3.125 19.140625 1.953125 \n",
       "Q 28.125 1.171875 27.734375 3.90625 \n",
       "L 27.734375 23.046875 \n",
       "L 17.578125 23.046875 \n",
       "Q 17.1875 17.96875 15.8125 9.765625 \n",
       "Q 14.453125 1.5625 9.765625 -7.421875 \n",
       "Q 7.03125 -4.6875 3.125 -3.90625 \n",
       "z\n",
       "M 67.1875 25.78125 \n",
       "L 40.234375 25.78125 \n",
       "L 40.234375 44.53125 \n",
       "L 67.1875 44.53125 \n",
       "z\n",
       "M 50.78125 69.921875 \n",
       "Q 50.78125 73.046875 50.390625 78.515625 \n",
       "L 57.8125 78.515625 \n",
       "Q 57.03125 73.046875 57.03125 69.921875 \n",
       "L 69.921875 69.921875 \n",
       "L 69.921875 64.453125 \n",
       "L 57.03125 64.453125 \n",
       "L 57.03125 56.640625 \n",
       "L 67.1875 56.640625 \n",
       "L 67.1875 51.171875 \n",
       "L 40.234375 51.171875 \n",
       "L 40.234375 56.640625 \n",
       "L 50.78125 56.640625 \n",
       "L 50.78125 64.453125 \n",
       "L 38.28125 64.453125 \n",
       "L 38.28125 69.921875 \n",
       "L 50.78125 69.921875 \n",
       "z\n",
       "M 60.15625 -5.859375 \n",
       "Q 65.234375 -3.515625 70.5 0.78125 \n",
       "Q 75.78125 5.078125 80.46875 12.109375 \n",
       "Q 85.15625 19.140625 87.5 27.34375 \n",
       "Q 92.1875 25 96.875 24.21875 \n",
       "Q 94.140625 21.484375 90.625 14.84375 \n",
       "Q 87.109375 8.203125 80.859375 0.78125 \n",
       "Q 74.609375 -6.640625 67.96875 -10.9375 \n",
       "Q 64.453125 -7.8125 60.15625 -5.859375 \n",
       "z\n",
       "M 69.140625 5.859375 \n",
       "Q 63.28125 4.6875 54.09375 2.34375 \n",
       "Q 44.921875 0 39.0625 -2.734375 \n",
       "Q 37.890625 1.953125 35.9375 5.46875 \n",
       "Q 41.015625 5.46875 56.640625 9.375 \n",
       "Q 58.59375 16.40625 59.375 21.875 \n",
       "Q 62.109375 21.09375 66.40625 20.3125 \n",
       "Q 64.84375 18.359375 62.890625 10.546875 \n",
       "Q 66.40625 11.328125 69.921875 12.890625 \n",
       "Q 69.140625 9.375 69.140625 5.859375 \n",
       "z\n",
       "M 67.578125 48.828125 \n",
       "Q 74.609375 57.03125 79.09375 64.84375 \n",
       "Q 83.59375 72.65625 85.15625 78.515625 \n",
       "Q 88.28125 76.5625 93.359375 74.609375 \n",
       "Q 90.234375 71.09375 85.9375 63.671875 \n",
       "Q 81.640625 56.25 74.609375 45.3125 \n",
       "Q 71.875 47.65625 67.578125 48.828125 \n",
       "z\n",
       "M 67.578125 24.21875 \n",
       "Q 73.4375 28.90625 77.734375 35.546875 \n",
       "Q 82.03125 42.1875 85.9375 50.78125 \n",
       "Q 88.671875 48.828125 93.359375 46.875 \n",
       "Q 91.015625 44.921875 86.515625 36.90625 \n",
       "Q 82.03125 28.90625 74.21875 19.921875 \n",
       "Q 71.484375 22.265625 67.578125 24.21875 \n",
       "z\n",
       "M 27.734375 29.296875 \n",
       "L 27.734375 45.703125 \n",
       "L 17.1875 45.703125 \n",
       "L 17.1875 29.296875 \n",
       "z\n",
       "M 27.734375 51.953125 \n",
       "L 27.734375 68.359375 \n",
       "L 17.1875 68.359375 \n",
       "L 17.1875 51.953125 \n",
       "z\n",
       "M 60.9375 31.25 \n",
       "L 60.9375 39.0625 \n",
       "L 46.484375 39.0625 \n",
       "L 46.484375 31.25 \n",
       "z\n",
       "M 44.921875 8.984375 \n",
       "Q 43.359375 14.0625 40.625 19.140625 \n",
       "Q 43.75 19.921875 46.875 21.875 \n",
       "Q 49.21875 16.015625 51.171875 11.71875 \n",
       "Q 48.046875 10.9375 44.921875 8.984375 \n",
       "z\n",
       "\" id=\"SimHei-33192\"/>\n",
       "     <path d=\"M 23.046875 0 \n",
       "Q 28.125 -0.390625 30.65625 -0.1875 \n",
       "Q 33.203125 0 33.59375 4.6875 \n",
       "L 33.59375 24.21875 \n",
       "L 18.359375 24.21875 \n",
       "Q 17.578125 14.84375 16.59375 9.5625 \n",
       "Q 15.625 4.296875 14.25 -0.1875 \n",
       "Q 12.890625 -4.6875 10.546875 -9.765625 \n",
       "Q 7.03125 -5.859375 3.125 -4.6875 \n",
       "Q 6.640625 0.78125 8.984375 8.390625 \n",
       "Q 11.328125 16.015625 12.109375 27.734375 \n",
       "L 12.109375 62.890625 \n",
       "Q 12.109375 69.140625 11.71875 75 \n",
       "L 41.015625 75 \n",
       "Q 40.625 67.1875 40.625 59.375 \n",
       "L 40.625 0 \n",
       "Q 40.625 -8.984375 25.390625 -9.765625 \n",
       "Q 25 -5.078125 23.046875 0 \n",
       "z\n",
       "M 50 -2.734375 \n",
       "Q 53.515625 0.390625 53.515625 5.46875 \n",
       "L 53.515625 36.71875 \n",
       "Q 48.828125 36.71875 43.75 36.328125 \n",
       "L 43.75 43.359375 \n",
       "Q 49.609375 42.96875 53.515625 42.96875 \n",
       "L 53.515625 67.96875 \n",
       "Q 53.515625 73.046875 53.125 78.125 \n",
       "L 61.328125 78.125 \n",
       "Q 60.9375 73.046875 60.9375 68.359375 \n",
       "L 60.9375 42.96875 \n",
       "L 82.421875 42.96875 \n",
       "Q 88.671875 42.96875 94.921875 43.359375 \n",
       "L 94.921875 36.328125 \n",
       "Q 88.671875 36.71875 82.8125 36.71875 \n",
       "L 76.171875 36.71875 \n",
       "Q 77.34375 28.125 79.484375 22.265625 \n",
       "Q 81.640625 16.40625 85.15625 10.9375 \n",
       "Q 88.671875 5.46875 96.875 0.78125 \n",
       "Q 92.1875 -4.296875 91.015625 -7.03125 \n",
       "Q 83.984375 -0.78125 80.078125 5.078125 \n",
       "Q 76.171875 10.9375 73.828125 16.796875 \n",
       "Q 71.484375 22.65625 70.5 27.34375 \n",
       "Q 69.53125 32.03125 69.140625 36.71875 \n",
       "L 60.9375 36.71875 \n",
       "L 60.9375 3.515625 \n",
       "Q 67.578125 7.8125 69.921875 9.375 \n",
       "Q 70.703125 5.859375 71.875 1.5625 \n",
       "Q 67.96875 -0.78125 62.890625 -3.90625 \n",
       "Q 57.8125 -7.03125 54.296875 -10.546875 \n",
       "Q 52.34375 -6.25 50 -2.734375 \n",
       "z\n",
       "M 89.84375 71.875 \n",
       "Q 86.71875 67.96875 80.859375 60.15625 \n",
       "Q 75 52.34375 70.703125 47.265625 \n",
       "Q 67.1875 50.78125 64.453125 52.734375 \n",
       "Q 70.703125 59.375 75.78125 66.015625 \n",
       "Q 80.859375 72.65625 82.8125 76.953125 \n",
       "Q 85.546875 74.21875 89.84375 71.875 \n",
       "z\n",
       "M 33.59375 30.859375 \n",
       "L 33.59375 46.875 \n",
       "L 19.140625 46.875 \n",
       "L 19.140625 30.859375 \n",
       "z\n",
       "M 33.59375 53.125 \n",
       "L 33.59375 68.75 \n",
       "L 19.140625 68.75 \n",
       "L 19.140625 53.125 \n",
       "z\n",
       "\" id=\"SimHei-32960\"/>\n",
       "    </defs>\n",
       "    <g transform=\"translate(162.6 169.733934)scale(0.12 -0.12)\">\n",
       "     <use xlink:href=\"#SimHei-33192\"/>\n",
       "     <use x=\"100\" xlink:href=\"#SimHei-32960\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       " </g>\n",
       " <defs>\n",
       "  <clipPath id=\"pa9d481e5f9\">\n",
       "   <rect height=\"62.775\" width=\"334.8\" x=\"7.2\" y=\"22.246875\"/>\n",
       "  </clipPath>\n",
       "  <clipPath id=\"p411df4c36f\">\n",
       "   <rect height=\"62.775\" width=\"334.8\" x=\"7.2\" y=\"98.990404\"/>\n",
       "  </clipPath>\n",
       "  <clipPath id=\"p0f6890faf2\">\n",
       "   <rect height=\"62.775\" width=\"334.8\" x=\"7.2\" y=\"175.733934\"/>\n",
       "  </clipPath>\n",
       " </defs>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<Figure size 432x288 with 3 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure()\n",
    "plt.subplot(3, 1, 1), plt.imshow(img, cmap=\"gray\")\n",
    "plt.axis(\"off\"), plt.title(\"原图\")\n",
    "plt.subplot(3, 1, 2), plt.imshow(myipf.mathematicalMorphology(img, model=\"erosion\"), cmap=\"gray\")\n",
    "plt.axis(\"off\"), plt.title(\"腐蚀\")\n",
    "plt.subplot(3, 1, 3), plt.imshow(myipf.mathematicalMorphology(img, model=\"dilasion\"), cmap=\"gray\")\n",
    "plt.axis(\"off\"), plt.title(\"膨胀\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "se = cv.getStructuringElement(cv.MORPH_CROSS, (5, 5))\n",
    "eroded = cv.erode(img, se)\n",
    "dilated = cv.dilate(img, se)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       "  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<!-- Created with matplotlib (https://matplotlib.org/) -->\n",
       "<svg height=\"245.708934pt\" version=\"1.1\" viewBox=\"0 0 349.2 245.708934\" width=\"349.2pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
       " <defs>\n",
       "  <style type=\"text/css\">\n",
       "*{stroke-linecap:butt;stroke-linejoin:round;}\n",
       "  </style>\n",
       " </defs>\n",
       " <g id=\"figure_1\">\n",
       "  <g id=\"patch_1\">\n",
       "   <path d=\"M 0 245.708934 \n",
       "L 349.2 245.708934 \n",
       "L 349.2 0 \n",
       "L 0 0 \n",
       "z\n",
       "\" style=\"fill:none;\"/>\n",
       "  </g>\n",
       "  <g id=\"axes_1\">\n",
       "   <g clip-path=\"url(#p939efe5f13)\">\n",
       "    <image height=\"63\" id=\"image275aea0b59\" transform=\"scale(1 -1)translate(0 -63)\" width=\"335\" x=\"7.2\" xlink:href=\"data:image/png;base64,\n",
       "iVBORw0KGgoAAAANSUhEUgAAAU8AAAA/CAYAAABgmEqHAAAABHNCSVQICAgIfAhkiAAAAlNJREFUeJzt3dtuozAUBVA8mv//ZeahYhS1JYGNjQ2s9VKpogXDYdvmkpRpmuYJgF3+9N4AgCsSngAB4QkQEJ4AAeEJEBCeAAHhCRAQngAB4QkQEJ4AAeEJEBCeAAHhCRAQngAB4QkQEJ4AAeEJEBCeAAHhCRAQngAB4QkQ+Jv80Tx/feFmKWXzsluXT72u51XLdX7ajrPWvdb2NS22a8821Fz/3v3d8vj0Pg4jngOftKqFrf/7SD3cYuT57mDN87y7qO/O/niW5Ry4+7lwdidx+fC8czG0cnaRweiScyKato9iyzB9WWae50eERq82fl/vnks7d9S73T3PhbVaWNuuXo4OvC4/8lysHZSRDhb09Hou3HXGdmYbbxOewGcGEz+l++TS03Yg94RLWS1Hn1VHnne/m8e1qMVnOqtDqDbyVKiM5Gk3Cln37ubZEa55Ao91pGNtEp5GofSk/ngXirXqo8q0XbEyolLK/+vwI76i6HLCtVUdeSoGYDSt3vmv/qhSz94eRpkFqf3+lixq5fDI8+mv4TGmpR6Xn6OEKn3VrIMmN4wEKT2pv3WjvmfeWovOs+mjSnp7zqTe2KpGx3EoPE3ZuQJT9y9PHHW2/KAQ77aHthyIUT7Z+wxrbf3t93ds/3e9H1Xq2VF8+nDyV1euhWbT9ivvFK5L3b1XSnn8PqrV/jJN07PnMgAB77YDBIQnQEB4AgSEJ0BAeAIEhCdAQHgCBIQnQEB4AgSEJ0BAeAIEhCdAQHgCBIQnQEB4AgSEJ0BAeAIEhCdAQHgCBIQnQOAfGhfaevGg/7sAAAAASUVORK5CYII=\" y=\"-22.021875\"/>\n",
       "   </g>\n",
       "   <g id=\"text_1\">\n",
       "    <!-- 原图 -->\n",
       "    <defs>\n",
       "     <path d=\"M 60.15625 66.796875 \n",
       "Q 57.421875 62.890625 56.25 57.8125 \n",
       "L 85.15625 57.8125 \n",
       "Q 84.765625 54.296875 84.765625 46.875 \n",
       "L 84.765625 34.765625 \n",
       "Q 84.765625 28.515625 85.15625 23.046875 \n",
       "L 63.28125 23.046875 \n",
       "L 63.28125 -0.78125 \n",
       "Q 63.28125 -6.25 59.765625 -7.609375 \n",
       "Q 56.25 -8.984375 48.4375 -9.765625 \n",
       "Q 47.65625 -5.078125 45.703125 -0.78125 \n",
       "Q 53.125 -1.171875 54.296875 -0.578125 \n",
       "Q 55.46875 0 55.46875 2.734375 \n",
       "L 55.46875 23.046875 \n",
       "L 33.203125 23.046875 \n",
       "Q 33.59375 27.734375 33.59375 34.375 \n",
       "L 33.59375 47.265625 \n",
       "Q 33.59375 53.515625 33.203125 57.8125 \n",
       "L 49.21875 57.8125 \n",
       "Q 51.5625 66.40625 51.5625 69.140625 \n",
       "L 60.15625 66.796875 \n",
       "z\n",
       "M 4.296875 -5.078125 \n",
       "Q 11.328125 4.296875 13.671875 16.203125 \n",
       "Q 16.015625 28.125 16.015625 35.9375 \n",
       "L 16.015625 64.453125 \n",
       "Q 16.015625 72.65625 15.625 76.5625 \n",
       "L 78.515625 76.5625 \n",
       "Q 87.109375 76.5625 90.625 76.953125 \n",
       "L 90.625 69.921875 \n",
       "Q 87.5 70.3125 78.515625 70.3125 \n",
       "L 23.828125 70.3125 \n",
       "L 23.828125 37.109375 \n",
       "Q 23.4375 25.78125 22.0625 17.375 \n",
       "Q 20.703125 8.984375 17.765625 1.953125 \n",
       "Q 14.84375 -5.078125 12.5 -8.984375 \n",
       "Q 8.59375 -6.25 4.296875 -5.078125 \n",
       "z\n",
       "M 76.953125 43.359375 \n",
       "L 76.953125 51.953125 \n",
       "L 41.015625 51.953125 \n",
       "L 41.015625 43.359375 \n",
       "z\n",
       "M 76.953125 29.296875 \n",
       "L 76.953125 37.5 \n",
       "L 41.015625 37.5 \n",
       "L 41.015625 29.296875 \n",
       "z\n",
       "M 23.046875 -0.78125 \n",
       "Q 28.125 2.34375 32.609375 7.03125 \n",
       "Q 37.109375 11.71875 40.234375 17.1875 \n",
       "Q 43.75 13.671875 46.484375 11.71875 \n",
       "Q 35.9375 -0.78125 28.515625 -6.25 \n",
       "Q 26.171875 -3.515625 23.046875 -0.78125 \n",
       "z\n",
       "M 75.390625 16.796875 \n",
       "Q 89.0625 4.6875 92.578125 0.390625 \n",
       "Q 89.84375 -1.953125 87.109375 -5.078125 \n",
       "Q 82.03125 1.171875 70.3125 11.328125 \n",
       "Q 73.046875 14.453125 75.390625 16.796875 \n",
       "z\n",
       "\" id=\"SimHei-21407\"/>\n",
       "     <path d=\"M 90.625 77.734375 \n",
       "Q 90.234375 67.96875 90.234375 56.25 \n",
       "L 90.234375 14.453125 \n",
       "Q 90.234375 2.34375 90.625 -9.375 \n",
       "L 82.8125 -9.375 \n",
       "L 82.8125 -4.296875 \n",
       "L 17.578125 -4.296875 \n",
       "L 17.578125 -10.15625 \n",
       "L 9.765625 -10.15625 \n",
       "Q 10.15625 1.953125 10.15625 14.84375 \n",
       "L 10.15625 56.25 \n",
       "Q 10.15625 67.578125 9.765625 77.734375 \n",
       "L 90.625 77.734375 \n",
       "z\n",
       "M 82.8125 2.34375 \n",
       "L 82.8125 71.484375 \n",
       "L 17.578125 71.484375 \n",
       "L 17.578125 2.34375 \n",
       "z\n",
       "M 50.390625 66.40625 \n",
       "Q 48.046875 64.0625 46.09375 61.328125 \n",
       "L 72.265625 61.328125 \n",
       "Q 70.703125 57.8125 67.1875 52.734375 \n",
       "Q 63.671875 47.65625 56.25 40.625 \n",
       "Q 67.96875 34.765625 79.296875 33.59375 \n",
       "Q 76.5625 30.078125 74.609375 26.171875 \n",
       "Q 60.15625 30.46875 50.390625 36.71875 \n",
       "Q 39.0625 29.296875 26.171875 25.78125 \n",
       "Q 25 29.296875 21.875 32.421875 \n",
       "Q 34.375 34.375 44.921875 40.625 \n",
       "Q 39.453125 45.703125 37.109375 49.21875 \n",
       "Q 33.59375 45.3125 29.6875 41.40625 \n",
       "Q 26.953125 44.53125 23.828125 46.09375 \n",
       "Q 30.46875 51.5625 35.15625 58.390625 \n",
       "Q 39.84375 65.234375 41.796875 69.921875 \n",
       "Q 45.703125 67.96875 50.390625 66.40625 \n",
       "z\n",
       "M 38.28125 19.921875 \n",
       "Q 55.46875 14.84375 64.0625 11.328125 \n",
       "Q 62.109375 8.203125 60.15625 4.6875 \n",
       "Q 44.140625 11.328125 35.546875 13.28125 \n",
       "Q 37.109375 16.40625 38.28125 19.921875 \n",
       "z\n",
       "M 45.703125 32.03125 \n",
       "Q 58.984375 26.5625 63.671875 25 \n",
       "Q 61.71875 21.875 60.15625 17.96875 \n",
       "Q 46.875 24.21875 42.1875 25.78125 \n",
       "Q 44.140625 28.515625 45.703125 32.03125 \n",
       "z\n",
       "M 41.015625 53.90625 \n",
       "Q 46.875 47.265625 51.171875 44.53125 \n",
       "Q 56.25 48.4375 60.546875 55.078125 \n",
       "L 41.796875 55.078125 \n",
       "L 41.015625 53.90625 \n",
       "z\n",
       "\" id=\"SimHei-22270\"/>\n",
       "    </defs>\n",
       "    <g transform=\"translate(162.6 16.246875)scale(0.12 -0.12)\">\n",
       "     <use xlink:href=\"#SimHei-21407\"/>\n",
       "     <use x=\"100\" xlink:href=\"#SimHei-22270\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       "  <g id=\"axes_2\">\n",
       "   <g clip-path=\"url(#p7bdf8d34b5)\">\n",
       "    <image height=\"63\" id=\"imageee5b04a40e\" transform=\"scale(1 -1)translate(0 -63)\" width=\"335\" x=\"7.2\" xlink:href=\"data:image/png;base64,\n",
       "iVBORw0KGgoAAAANSUhEUgAAAU8AAAA/CAYAAABgmEqHAAAABHNCSVQICAgIfAhkiAAAAmdJREFUeJzt3dtymzAUBVDU6f//svvQ8Qx1cYANutha6zFxBgkftsRFpCzL8lgAOOVX7wYAfCLhCRAQngAB4QkQEJ4AAeEJEBCeAAHhCRAQngAB4QkQEJ4AAeEJEBCeAAHhCRAQngAB4QkQEJ4AAeEJEBCeAAHhCRAQngAB4QkQ+J380ePx978Vl1IOf/7oZ1PPNm2pve1XLfq7tc2jarXtSBtqbPvM/j5bu0lbjqq1L1puL2nHU83+t6iHKDxH824HPH/eI8x66dnP9bZrh9Toevd761ho+Z1s1UKLbZdSTg1gV3z8aftPBVFK6V7ELc3U15H1/h72joVW4fLantFmvk9puz4+PJflWOdbFwyMqHewt9Cqj18RnsA5JhPX98FXXPPc0/I6CIxuluOh9k2rKcITmNdWQN4xeNx62r6+o9fCDKMnOfUxr72bVHdcF3XNE5jOUDNPozwjeT7b26MuHQvjqLlo4NZrnjM8BgFH7AWoY6W+2oPnbeH5uqJAcdDLuv561aH6/363nLY7TWFkvVbUMKa7Jne3hOdrQxQPPanHn8022anV32p322f7ghiDumOt5sB5OTwVK59Anf7LbPy6aiuMZlkC9o6bZm3N/gq8o2Y9Jmu8Fu/SzFNA/G/W4hxdy8G8dw1sbb/1+zy32tNrv9Tqr7XtF+wVw9bvv3mweXfQrn1z/9d6P+fZe7+/63/LFyPXVpZlMVUCOMnadoCA8AQICE+AgPAECAhPgIDwBAgIT4CA8AQICE+AgPAECAhPgIDwBAgIT4CA8AQICE+AgPAECAhPgIDwBAgIT4CA8AQI/AHCpuaLE8cn4wAAAABJRU5ErkJggg==\" y=\"-98.765404\"/>\n",
       "   </g>\n",
       "   <g id=\"text_2\">\n",
       "    <!-- 腐蚀 -->\n",
       "    <defs>\n",
       "     <path d=\"M 60.9375 34.765625 \n",
       "Q 59.375 32.421875 58.984375 30.078125 \n",
       "L 86.328125 30.078125 \n",
       "Q 85.9375 25 85.9375 20.703125 \n",
       "L 85.9375 1.5625 \n",
       "Q 85.9375 -4.6875 83.390625 -6.4375 \n",
       "Q 80.859375 -8.203125 75.390625 -8.984375 \n",
       "Q 74.21875 -4.6875 71.875 -1.5625 \n",
       "Q 76.171875 -1.5625 77.734375 -0.96875 \n",
       "Q 79.296875 -0.390625 79.296875 2.734375 \n",
       "L 79.296875 24.21875 \n",
       "L 58.203125 24.21875 \n",
       "Q 61.328125 22.65625 65.421875 20.3125 \n",
       "Q 69.53125 17.96875 74.21875 15.234375 \n",
       "Q 71.875 12.5 69.53125 8.59375 \n",
       "Q 66.015625 12.109375 62.296875 14.640625 \n",
       "Q 58.59375 17.1875 55.078125 19.140625 \n",
       "Q 50.78125 14.0625 42.1875 7.8125 \n",
       "Q 40.234375 11.71875 37.5 14.453125 \n",
       "Q 43.359375 16.796875 46.09375 18.9375 \n",
       "Q 48.828125 21.09375 51.171875 24.21875 \n",
       "L 35.546875 24.21875 \n",
       "L 35.546875 -7.8125 \n",
       "L 28.125 -7.8125 \n",
       "Q 28.515625 0 28.515625 12.109375 \n",
       "Q 28.515625 24.609375 28.125 30.078125 \n",
       "L 52.734375 30.078125 \n",
       "Q 53.515625 32.421875 53.515625 35.9375 \n",
       "Q 58.203125 35.15625 60.9375 34.765625 \n",
       "z\n",
       "M 21.484375 67.1875 \n",
       "Q 21.484375 33.59375 20.5 24.796875 \n",
       "Q 19.53125 16.015625 17.578125 8.59375 \n",
       "Q 15.625 1.171875 11.328125 -7.03125 \n",
       "Q 8.59375 -3.515625 5.078125 -1.171875 \n",
       "Q 8.984375 4.6875 10.9375 12.109375 \n",
       "Q 12.890625 19.53125 13.671875 28.703125 \n",
       "Q 14.453125 37.890625 14.453125 52.34375 \n",
       "Q 14.453125 67.1875 14.0625 73.4375 \n",
       "L 48.828125 73.4375 \n",
       "Q 48.4375 75 47.265625 79.296875 \n",
       "Q 50.78125 79.6875 55.859375 80.859375 \n",
       "Q 56.640625 76.953125 57.421875 73.4375 \n",
       "L 92.96875 73.4375 \n",
       "L 92.96875 66.796875 \n",
       "Q 85.546875 67.1875 79.6875 67.1875 \n",
       "L 21.484375 67.1875 \n",
       "z\n",
       "M 80.078125 64.453125 \n",
       "Q 79.6875 60.9375 79.6875 57.421875 \n",
       "Q 85.15625 57.421875 90.625 57.8125 \n",
       "L 90.625 51.5625 \n",
       "Q 85.15625 51.953125 79.6875 51.953125 \n",
       "L 79.6875 41.015625 \n",
       "Q 79.6875 35.9375 76.953125 34.5625 \n",
       "Q 74.21875 33.203125 68.359375 32.03125 \n",
       "Q 67.1875 35.9375 64.84375 39.0625 \n",
       "Q 70.3125 39.0625 71.484375 39.453125 \n",
       "Q 72.65625 39.84375 72.65625 43.75 \n",
       "L 72.65625 51.953125 \n",
       "L 56.25 51.953125 \n",
       "Q 50 51.953125 44.921875 51.5625 \n",
       "L 44.921875 57.8125 \n",
       "Q 50 57.421875 56.25 57.421875 \n",
       "L 72.65625 57.421875 \n",
       "Q 72.65625 60.9375 72.265625 64.453125 \n",
       "L 80.078125 64.453125 \n",
       "z\n",
       "M 21.875 47.65625 \n",
       "Q 27.34375 51.171875 31.046875 55.859375 \n",
       "Q 34.765625 60.546875 37.5 66.40625 \n",
       "Q 40.625 64.453125 44.53125 62.5 \n",
       "Q 41.796875 58.984375 40.234375 56.640625 \n",
       "L 40.234375 44.140625 \n",
       "Q 40.234375 39.84375 40.625 33.203125 \n",
       "L 32.8125 33.203125 \n",
       "Q 33.203125 39.453125 33.203125 44.140625 \n",
       "L 33.203125 48.4375 \n",
       "Q 30.46875 45.3125 26.953125 41.40625 \n",
       "Q 25 44.921875 21.875 47.65625 \n",
       "z\n",
       "M 60.546875 12.890625 \n",
       "Q 58.59375 10.15625 58.203125 8.984375 \n",
       "Q 64.0625 5.859375 72.265625 0.78125 \n",
       "Q 69.921875 -1.953125 67.578125 -5.078125 \n",
       "Q 61.328125 0.390625 55.078125 4.6875 \n",
       "Q 52.34375 0 42.96875 -7.8125 \n",
       "Q 41.015625 -4.296875 38.28125 -2.34375 \n",
       "Q 43.359375 0.78125 47.265625 4.6875 \n",
       "Q 51.171875 8.59375 53.90625 15.625 \n",
       "Q 56.640625 13.671875 60.546875 12.890625 \n",
       "z\n",
       "M 50.390625 47.265625 \n",
       "Q 53.90625 48.4375 56.640625 50.390625 \n",
       "Q 58.59375 45.703125 60.9375 40.625 \n",
       "Q 58.203125 39.84375 55.078125 38.28125 \n",
       "Q 53.125 43.359375 50.390625 47.265625 \n",
       "z\n",
       "\" id=\"SimHei-33104\"/>\n",
       "     <path d=\"M 61.71875 60.15625 \n",
       "Q 61.71875 73.828125 61.328125 79.6875 \n",
       "L 69.921875 79.6875 \n",
       "Q 69.53125 73.828125 69.53125 60.15625 \n",
       "L 90.234375 60.15625 \n",
       "Q 89.84375 54.6875 89.84375 40.234375 \n",
       "Q 89.84375 25.78125 90.234375 18.75 \n",
       "L 82.8125 18.75 \n",
       "L 82.8125 23.4375 \n",
       "L 69.53125 23.4375 \n",
       "L 69.53125 2.734375 \n",
       "Q 76.953125 3.515625 82.8125 4.296875 \n",
       "Q 80.859375 9.765625 78.90625 12.890625 \n",
       "Q 83.203125 14.453125 85.9375 16.015625 \n",
       "Q 88.671875 10.9375 91.203125 4.484375 \n",
       "Q 93.75 -1.953125 95.703125 -7.421875 \n",
       "Q 92.1875 -8.203125 87.890625 -9.765625 \n",
       "Q 86.71875 -5.46875 84.765625 -1.953125 \n",
       "L 55.859375 -5.859375 \n",
       "Q 41.40625 -7.8125 38.28125 -8.59375 \n",
       "Q 37.5 -4.6875 34.765625 -0.390625 \n",
       "Q 42.578125 0 48.625 0.578125 \n",
       "Q 54.6875 1.171875 61.71875 1.953125 \n",
       "L 61.71875 23.4375 \n",
       "L 50 23.4375 \n",
       "L 50 17.578125 \n",
       "L 42.1875 16.015625 \n",
       "Q 42.578125 23.046875 42.578125 38.671875 \n",
       "Q 42.578125 54.296875 42.1875 60.15625 \n",
       "L 61.71875 60.15625 \n",
       "z\n",
       "M 25 42.578125 \n",
       "Q 24.609375 35.15625 24.609375 27.734375 \n",
       "L 24.609375 7.421875 \n",
       "Q 30.46875 13.28125 33.203125 17.96875 \n",
       "Q 35.15625 13.28125 37.890625 10.9375 \n",
       "Q 34.765625 8.203125 28.515625 0.96875 \n",
       "Q 22.265625 -6.25 20.3125 -8.984375 \n",
       "Q 16.796875 -5.859375 14.0625 -3.125 \n",
       "Q 16.796875 -0.390625 16.796875 5.46875 \n",
       "L 16.796875 42.578125 \n",
       "L 25 42.578125 \n",
       "z\n",
       "M 26.5625 75.390625 \n",
       "Q 25 73.046875 23.625 69.921875 \n",
       "Q 22.265625 66.796875 21.09375 64.0625 \n",
       "L 40.625 64.0625 \n",
       "Q 37.5 51.171875 35.546875 45.3125 \n",
       "Q 31.640625 46.875 28.125 47.265625 \n",
       "Q 30.078125 52.734375 31.25 57.8125 \n",
       "L 18.75 57.8125 \n",
       "Q 14.453125 48.4375 10.15625 40.625 \n",
       "Q 7.03125 43.75 3.515625 44.53125 \n",
       "Q 6.640625 48.4375 11.515625 59.171875 \n",
       "Q 16.40625 69.921875 18.359375 78.515625 \n",
       "L 26.5625 75.390625 \n",
       "z\n",
       "M 82.8125 29.6875 \n",
       "L 82.8125 54.296875 \n",
       "L 69.53125 54.296875 \n",
       "L 69.53125 29.6875 \n",
       "z\n",
       "M 61.71875 29.6875 \n",
       "L 61.71875 54.296875 \n",
       "L 50 54.296875 \n",
       "L 50 29.6875 \n",
       "z\n",
       "\" id=\"SimHei-34432\"/>\n",
       "    </defs>\n",
       "    <g transform=\"translate(162.6 92.990404)scale(0.12 -0.12)\">\n",
       "     <use xlink:href=\"#SimHei-33104\"/>\n",
       "     <use x=\"100\" xlink:href=\"#SimHei-34432\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       "  <g id=\"axes_3\">\n",
       "   <g clip-path=\"url(#p583e31ffca)\">\n",
       "    <image height=\"63\" id=\"image4be108fabb\" transform=\"scale(1 -1)translate(0 -63)\" width=\"335\" x=\"7.2\" xlink:href=\"data:image/png;base64,\n",
       "iVBORw0KGgoAAAANSUhEUgAAAU8AAAA/CAYAAABgmEqHAAAABHNCSVQICAgIfAhkiAAAAoNJREFUeJzt3cuSmzAQBVCUyv//MllN4lDGRk0LCXRO1ewY60FzscDYZVmWdQGgyq/eHQC4I+EJECA8AQKEJ0CA8AQIEJ4AAcITIEB4AgQIT4AA4QkQIDwBAoQnQIDwBAgQngABwhMgQHgCBAhPgADhCRAgPAEChCdAwO/eHci2rv9+z66U0rEnwJOVpfLXM1/DaVm+B1Tt9hHbNrauDNErxvupvaMy+1Xbh5Ztf3rtlvvmLvthxHrM6tPZbKrtS9Nle7SgsttY1/WSvsDoHAf7akP81tc8FQLUm+W4aT3OW4fnO6WUv39bsxTNN9lLN9eWY3rOW6tjoXZMmXNw9Xze9obRkesVpZQpA7PHQfna5tXXfUfVe9zb9rf7ZV3XJn28Qy1k9Ou24QnUmfHNRMvxPmbZPsoZDZhDWnj+3NGe7czGmNTjMU+bnyvfRKWE57trKdCLetw34wrt9Sbyu/FH5+Qxy3aAZfl+oyyLG0bQyEhPvpGv2TtPSyV6UHfUOHMCOx2eipU7UKdz2QvFzDqwbOexen+uccRl+awnkRYPBKQu20csFmDfTMds9tNOaeH505GZdgbjUo+05qNKMInZluytT5yuecKDfQpM78rPaRKevS/Ut1Yztr1tn1S43+bj6m/WGWVue3+ze4/grK2Fln35JKPNlGX7KMUK76jP/800Hy3HWh2e774z88h2n7aNOPpar9tltX/2dVrOw13P4llq6vGKdrP/54y9Z7uz22i5fYa0HFgqfwAOAHfbAUKEJ0CA8AQIEJ4AAcITIEB4AgQIT4AA4QkQIDwBAoQnQIDwBAgQngABwhMgQHgCBAhPgADhCRAgPAEChCdAgPAECPgD7ivJ2EXSHQgAAAAASUVORK5CYII=\" y=\"-175.508934\"/>\n",
       "   </g>\n",
       "   <g id=\"text_3\">\n",
       "    <!-- 膨胀 -->\n",
       "    <defs>\n",
       "     <path d=\"M 3.125 -3.90625 \n",
       "Q 6.640625 2.34375 8.78125 10.15625 \n",
       "Q 10.9375 17.96875 10.9375 27.34375 \n",
       "L 10.9375 61.328125 \n",
       "Q 10.9375 67.96875 10.546875 74.609375 \n",
       "L 34.375 74.609375 \n",
       "Q 33.984375 68.359375 33.984375 60.546875 \n",
       "L 33.984375 0.78125 \n",
       "Q 33.59375 -6.25 21.484375 -7.03125 \n",
       "Q 21.875 -3.125 19.140625 1.953125 \n",
       "Q 28.125 1.171875 27.734375 3.90625 \n",
       "L 27.734375 23.046875 \n",
       "L 17.578125 23.046875 \n",
       "Q 17.1875 17.96875 15.8125 9.765625 \n",
       "Q 14.453125 1.5625 9.765625 -7.421875 \n",
       "Q 7.03125 -4.6875 3.125 -3.90625 \n",
       "z\n",
       "M 67.1875 25.78125 \n",
       "L 40.234375 25.78125 \n",
       "L 40.234375 44.53125 \n",
       "L 67.1875 44.53125 \n",
       "z\n",
       "M 50.78125 69.921875 \n",
       "Q 50.78125 73.046875 50.390625 78.515625 \n",
       "L 57.8125 78.515625 \n",
       "Q 57.03125 73.046875 57.03125 69.921875 \n",
       "L 69.921875 69.921875 \n",
       "L 69.921875 64.453125 \n",
       "L 57.03125 64.453125 \n",
       "L 57.03125 56.640625 \n",
       "L 67.1875 56.640625 \n",
       "L 67.1875 51.171875 \n",
       "L 40.234375 51.171875 \n",
       "L 40.234375 56.640625 \n",
       "L 50.78125 56.640625 \n",
       "L 50.78125 64.453125 \n",
       "L 38.28125 64.453125 \n",
       "L 38.28125 69.921875 \n",
       "L 50.78125 69.921875 \n",
       "z\n",
       "M 60.15625 -5.859375 \n",
       "Q 65.234375 -3.515625 70.5 0.78125 \n",
       "Q 75.78125 5.078125 80.46875 12.109375 \n",
       "Q 85.15625 19.140625 87.5 27.34375 \n",
       "Q 92.1875 25 96.875 24.21875 \n",
       "Q 94.140625 21.484375 90.625 14.84375 \n",
       "Q 87.109375 8.203125 80.859375 0.78125 \n",
       "Q 74.609375 -6.640625 67.96875 -10.9375 \n",
       "Q 64.453125 -7.8125 60.15625 -5.859375 \n",
       "z\n",
       "M 69.140625 5.859375 \n",
       "Q 63.28125 4.6875 54.09375 2.34375 \n",
       "Q 44.921875 0 39.0625 -2.734375 \n",
       "Q 37.890625 1.953125 35.9375 5.46875 \n",
       "Q 41.015625 5.46875 56.640625 9.375 \n",
       "Q 58.59375 16.40625 59.375 21.875 \n",
       "Q 62.109375 21.09375 66.40625 20.3125 \n",
       "Q 64.84375 18.359375 62.890625 10.546875 \n",
       "Q 66.40625 11.328125 69.921875 12.890625 \n",
       "Q 69.140625 9.375 69.140625 5.859375 \n",
       "z\n",
       "M 67.578125 48.828125 \n",
       "Q 74.609375 57.03125 79.09375 64.84375 \n",
       "Q 83.59375 72.65625 85.15625 78.515625 \n",
       "Q 88.28125 76.5625 93.359375 74.609375 \n",
       "Q 90.234375 71.09375 85.9375 63.671875 \n",
       "Q 81.640625 56.25 74.609375 45.3125 \n",
       "Q 71.875 47.65625 67.578125 48.828125 \n",
       "z\n",
       "M 67.578125 24.21875 \n",
       "Q 73.4375 28.90625 77.734375 35.546875 \n",
       "Q 82.03125 42.1875 85.9375 50.78125 \n",
       "Q 88.671875 48.828125 93.359375 46.875 \n",
       "Q 91.015625 44.921875 86.515625 36.90625 \n",
       "Q 82.03125 28.90625 74.21875 19.921875 \n",
       "Q 71.484375 22.265625 67.578125 24.21875 \n",
       "z\n",
       "M 27.734375 29.296875 \n",
       "L 27.734375 45.703125 \n",
       "L 17.1875 45.703125 \n",
       "L 17.1875 29.296875 \n",
       "z\n",
       "M 27.734375 51.953125 \n",
       "L 27.734375 68.359375 \n",
       "L 17.1875 68.359375 \n",
       "L 17.1875 51.953125 \n",
       "z\n",
       "M 60.9375 31.25 \n",
       "L 60.9375 39.0625 \n",
       "L 46.484375 39.0625 \n",
       "L 46.484375 31.25 \n",
       "z\n",
       "M 44.921875 8.984375 \n",
       "Q 43.359375 14.0625 40.625 19.140625 \n",
       "Q 43.75 19.921875 46.875 21.875 \n",
       "Q 49.21875 16.015625 51.171875 11.71875 \n",
       "Q 48.046875 10.9375 44.921875 8.984375 \n",
       "z\n",
       "\" id=\"SimHei-33192\"/>\n",
       "     <path d=\"M 23.046875 0 \n",
       "Q 28.125 -0.390625 30.65625 -0.1875 \n",
       "Q 33.203125 0 33.59375 4.6875 \n",
       "L 33.59375 24.21875 \n",
       "L 18.359375 24.21875 \n",
       "Q 17.578125 14.84375 16.59375 9.5625 \n",
       "Q 15.625 4.296875 14.25 -0.1875 \n",
       "Q 12.890625 -4.6875 10.546875 -9.765625 \n",
       "Q 7.03125 -5.859375 3.125 -4.6875 \n",
       "Q 6.640625 0.78125 8.984375 8.390625 \n",
       "Q 11.328125 16.015625 12.109375 27.734375 \n",
       "L 12.109375 62.890625 \n",
       "Q 12.109375 69.140625 11.71875 75 \n",
       "L 41.015625 75 \n",
       "Q 40.625 67.1875 40.625 59.375 \n",
       "L 40.625 0 \n",
       "Q 40.625 -8.984375 25.390625 -9.765625 \n",
       "Q 25 -5.078125 23.046875 0 \n",
       "z\n",
       "M 50 -2.734375 \n",
       "Q 53.515625 0.390625 53.515625 5.46875 \n",
       "L 53.515625 36.71875 \n",
       "Q 48.828125 36.71875 43.75 36.328125 \n",
       "L 43.75 43.359375 \n",
       "Q 49.609375 42.96875 53.515625 42.96875 \n",
       "L 53.515625 67.96875 \n",
       "Q 53.515625 73.046875 53.125 78.125 \n",
       "L 61.328125 78.125 \n",
       "Q 60.9375 73.046875 60.9375 68.359375 \n",
       "L 60.9375 42.96875 \n",
       "L 82.421875 42.96875 \n",
       "Q 88.671875 42.96875 94.921875 43.359375 \n",
       "L 94.921875 36.328125 \n",
       "Q 88.671875 36.71875 82.8125 36.71875 \n",
       "L 76.171875 36.71875 \n",
       "Q 77.34375 28.125 79.484375 22.265625 \n",
       "Q 81.640625 16.40625 85.15625 10.9375 \n",
       "Q 88.671875 5.46875 96.875 0.78125 \n",
       "Q 92.1875 -4.296875 91.015625 -7.03125 \n",
       "Q 83.984375 -0.78125 80.078125 5.078125 \n",
       "Q 76.171875 10.9375 73.828125 16.796875 \n",
       "Q 71.484375 22.65625 70.5 27.34375 \n",
       "Q 69.53125 32.03125 69.140625 36.71875 \n",
       "L 60.9375 36.71875 \n",
       "L 60.9375 3.515625 \n",
       "Q 67.578125 7.8125 69.921875 9.375 \n",
       "Q 70.703125 5.859375 71.875 1.5625 \n",
       "Q 67.96875 -0.78125 62.890625 -3.90625 \n",
       "Q 57.8125 -7.03125 54.296875 -10.546875 \n",
       "Q 52.34375 -6.25 50 -2.734375 \n",
       "z\n",
       "M 89.84375 71.875 \n",
       "Q 86.71875 67.96875 80.859375 60.15625 \n",
       "Q 75 52.34375 70.703125 47.265625 \n",
       "Q 67.1875 50.78125 64.453125 52.734375 \n",
       "Q 70.703125 59.375 75.78125 66.015625 \n",
       "Q 80.859375 72.65625 82.8125 76.953125 \n",
       "Q 85.546875 74.21875 89.84375 71.875 \n",
       "z\n",
       "M 33.59375 30.859375 \n",
       "L 33.59375 46.875 \n",
       "L 19.140625 46.875 \n",
       "L 19.140625 30.859375 \n",
       "z\n",
       "M 33.59375 53.125 \n",
       "L 33.59375 68.75 \n",
       "L 19.140625 68.75 \n",
       "L 19.140625 53.125 \n",
       "z\n",
       "\" id=\"SimHei-32960\"/>\n",
       "    </defs>\n",
       "    <g transform=\"translate(162.6 169.733934)scale(0.12 -0.12)\">\n",
       "     <use xlink:href=\"#SimHei-33192\"/>\n",
       "     <use x=\"100\" xlink:href=\"#SimHei-32960\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       " </g>\n",
       " <defs>\n",
       "  <clipPath id=\"p939efe5f13\">\n",
       "   <rect height=\"62.775\" width=\"334.8\" x=\"7.2\" y=\"22.246875\"/>\n",
       "  </clipPath>\n",
       "  <clipPath id=\"p7bdf8d34b5\">\n",
       "   <rect height=\"62.775\" width=\"334.8\" x=\"7.2\" y=\"98.990404\"/>\n",
       "  </clipPath>\n",
       "  <clipPath id=\"p583e31ffca\">\n",
       "   <rect height=\"62.775\" width=\"334.8\" x=\"7.2\" y=\"175.733934\"/>\n",
       "  </clipPath>\n",
       " </defs>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<Figure size 432x288 with 3 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.subplot(3, 1, 1), plt.imshow(img, cmap=\"gray\")\n",
    "plt.axis(\"off\"), plt.title(\"原图\")\n",
    "plt.subplot(3, 1, 2), plt.imshow(eroded, cmap=\"gray\")\n",
    "plt.axis(\"off\"), plt.title(\"腐蚀\")\n",
    "plt.subplot(3, 1, 3), plt.imshow(dilated, cmap=\"gray\")\n",
    "plt.axis(\"off\"), plt.title(\"膨胀\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
